package com.wuzf.demo;


import org.springframework.boot.Banner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;

import java.util.HashSet;
import java.util.Set;

@SpringBootApplication
public class SpringApplicationBootstrap {

    public static void main(String[] args) {
//        SpringApplication.run(SpringApplicationBootstrap.class, args);
        Set<String> sources = new HashSet();
        sources.add(SpringApplicationBootstrap.class.getName());
        SpringApplication application = new SpringApplication();
        // 这里也可以添加xml配置文件，现在是添加了引导文件
        application.setSources(sources);
        // 去掉Web类型推断
        application.setWebApplicationType(WebApplicationType.NONE);
        // 设置环境
        application.setAdditionalProfiles("prod");
        //
        application.setBannerMode(Banner.Mode.CONSOLE);
        application.setHeadless(true);
        application.run(args);

    }

}
